package com.laolang.spring4.el;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.io.Resource;

@Configuration
@ComponentScan("com.laolang.spring4.el")
@PropertySource("classpath:com/laolang/spring4/el/test.properties")
public class ElConfig {
	
	
	public String getNomal() {
		return nomal;
	}


	public void setNomal(String nomal) {
		this.nomal = nomal;
	}


	public String getOsName() {
		return osName;
	}


	public void setOsName(String osName) {
		this.osName = osName;
	}


	public double getRandomNumber() {
		return randomNumber;
	}


	public void setRandomNumber(double randomNumber) {
		this.randomNumber = randomNumber;
	}


	public String getFromAnother() {
		return fromAnother;
	}


	public void setFromAnother(String fromAnother) {
		this.fromAnother = fromAnother;
	}


	public Resource getResource() {
		return resource;
	}


	public void setResource(Resource resource) {
		this.resource = resource;
	}


	public String getBookName() {
		return bookName;
	}


	public void setBookName(String bookName) {
		this.bookName = bookName;
	}

	




	@Value("I Love You!")
	private String nomal;
	
	@Value("#{systemProperties['os.name']}")
	private String osName;
	
	@Value("#{ T(java.lang.Math).random() * 100.0 }")
	private double randomNumber;
	
	@Value("#{demoElService.another}")
	private String fromAnother;
	
	@Value("classpath:com/laolang/spring4/el/test.txt")
	private Resource resource;
	
	
	@Value("${book.name}")
	private String bookName;
	
}
